![]() |
PATH![]() |
![]() ![]() |
Simulates an item selection in a modal dialog box after a specified amount of time elapses.
pascal OSStatus SetDialogTimeout (
DialogPtr inDialog,
SInt16 inButtonToPress,
UInt32 inSecondsToWait);
Your application calls the SetDialogTimeout function each time you wish to start a countdown of the specified duration for a given modal dialog box. When the amount of time specified in the inSecondsToWait parameter has elapsed, the Dialog Manager simulates a click on the button specified in the inButtonToPress parameter. If your application calls SetDialogTimeout again, or if any event is received for the dialog box, the countdown is restarted.
In order to use SetDialogTimeout with a given modal dialog box, your application must handle events for the dialog box through the ModalDialog function. The Dialog Manager will not simulate an item selection for the dialog box until ModalDialog processes an event (including null events).